import { h } from 'vue';
import { NAvatar ,NTag} from 'naive-ui';
import { BasicColumn } from '@/components/Table';


export interface ListDataAboutLabFix {
  id: string;
  account:string
  username: string;
  major: string,
  class_name: string

}

export const columnsAboutLabFix: BasicColumn<ListData>[] = [
  
  {
    title: 'ID',
    key: 'id',
    width: 40,
  },
  {
    title: '实验室名称',
    key: 'labName',
    width: 100,
  },
  {
    title: '申请教师',
    key: 'teacherName',
    width: 100,
  },
  {
    title: '问题描述',
    key: 'description',
    width: 100,
  },
  {
    title: '状态',
    key: 'state',
    width: 100,
    render (row) {
      if(row.state == 0){
        //未审核
        return h(
          NTag,
          {
            style: {
              marginRight: '6px'
            },
            // type: 'info',
            bordered: false
          },
          {
            default: () => "未维修"
          }
        )
      }else if(row.state == 1){
        //通过
        return h(
          NTag,
          {
            style: {
              marginRight: '6px'
            },
            type: 'success',
            bordered: false
          },
          {
            default: () => "维修中"
          }
        )
      }else if(row.state == 2){
        //驳回
        return h(
          NTag,
          {
            style: {
              marginRight: '6px'
            },
            type: 'error',
            bordered: false
          },
          {
            default: () => "已维修"
          }
        )
      }
        
      
    }
  }
  
];


